package com.ziq.zcamp.place

import android.content.Context
import android.content.Intent
import com.ziq.base.base.BaseActivity
import com.ziq.zcamp.bean.product.PlaceProduct
import com.ziq.zcamp.manager.GlobalContextManager
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class PlaceProductDetailActivity : BaseActivity() {

    companion object {
        const val DETAIL_ID = "detail_id"
        const val DETAIL_ITEM = "detail_item"
        const val DETAIL_SOURCE = "detail_source"
        const val SHOW_OPEN_CAMP = "show_open_camp"
        const val FROM_CAMP_DETAIL = "from_camp_detail"
        fun open(context: Context, detailId:Long?, product: PlaceProduct? = null, source:String? = "", showOpenCamp:Boolean = true, fromCampDetail:Boolean = false){
            val intent = Intent(context, PlaceProductDetailActivity::class.java)
            intent.putExtra(DETAIL_ID, detailId)
            intent.putExtra(DETAIL_ITEM, product)
            intent.putExtra(DETAIL_SOURCE, source)
            intent.putExtra(SHOW_OPEN_CAMP, showOpenCamp)
            intent.putExtra(FROM_CAMP_DETAIL, fromCampDetail)
            GlobalContextManager.startActivity(context, intent)
        }
    }

}